﻿Imports System.Windows.Media.Animation

Module Animations
    Public Sub ChangeDockColor(ByVal newColor As Color)
        Dim Background As SolidColorBrush = DirectCast(MyProperties.DockWindow.PinStackPanel.Background, SolidColorBrush)
        Dim NewBackground As SolidColorBrush = Background
        MyProperties.DockWindow.PinStackPanel.Background = NewBackground

        Dim cAnim As New ColorAnimation(Background.Color, newColor, New Duration(TimeSpan.FromSeconds(1.25))) With {.EasingFunction = New ExponentialEase With {.EasingMode = EasingMode.EaseInOut}}
        NewBackground.BeginAnimation(SolidColorBrush.ColorProperty, cAnim)
    End Sub
End Module
